package com.luguangtao.api;
import com.github.pagehelper.PageInfo;
import com.luguangtao.bean.Clazz;
import com.luguangtao.bean.Student;
import com.luguangtao.bean.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @类名: com.luguangtao.api
 * @作者: lgt
 * @创建时间: 2019-12-07 09:09
 * @描述:
 **/
@FeignClient(name = "CLIENT01")
public interface ClientApi {
    //登录
    @RequestMapping("login1")
    public String login1(@RequestParam String username, @RequestParam String password);
    //注册
    @RequestMapping("regist1")
    public String regist1(@RequestBody User user);
    //列表
    @RequestMapping("lists1")
    public PageInfo<Student> lists1(@RequestParam Integer pageNum, @RequestParam Integer pageSize);
    //获取班级
    @RequestMapping("getClazz1")
    public List<Clazz> getClazz1();
    //添加
    @RequestMapping("addStu1")
    public int addStu1(@RequestBody Student student);
    //删除
    @RequestMapping("del1")
    public int del1(@RequestParam Integer stuid);
    //回显
    @RequestMapping("getStudent1")
    public Student getStudent1(@RequestParam Integer stuid);
    //修改
    @RequestMapping("updateStu1")
    public int updateStu1(@RequestBody Student student);
}
